/**
 * Sections
 */
.block {
  padding-top: 5em;
}

.block:first-child,
.page-header + .block {
  padding-top: 0;
}

.block-image {
  margin-bottom: 1.66667em;
}

.block-header {
  margin-bottom: 2.5em;
}

.block-title {
  font-size: 1.66667em;
  margin: 0;
}

.block-subtitle {
  color: _palette(charcoal-light-40);
  font-size: 0.88889em;
  line-height: 1.5;
  margin: 0.5em 0 0;

  .palette-dark & {
    color: _palette(charcoal-light-25);
  }
}

.block-buttons,
.grid-item-buttons {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-bottom: 0.83333em;

  a {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 0.9375em;
    margin-right: 20px;

    &:not(.button) {
      border: 0;
    }
  }
}

/* Grid section */
.grid-item-counter {
  box-sizing: border-box;
  display: inline-block;
  font-size: 1.33333em;
  font-weight: bold;
  line-height: 1.5;
  margin-bottom: 1em;
  padding: 0.58333em 0;
  position: relative;
  text-align: center;
  width: 2.66667em;

  &:before,
  &:after {
    border: 2px solid _palette(charcoal-light-75);
    box-sizing: border-box;
    content: "";
    height: 35%;
    left: 0;
    position: absolute;
    width: 100%;

    .palette-dark & {
      border-color: _palette(charcoal-light-7);
    }
  }

  &:before {
    border-bottom: 0;
    top: 0;
  }

  &:after {
    border-top: 0;
    bottom: 0;
  }
}

.grid-item-title {
  font-size: 1.33333em;
  margin: 0 0 0.75em;
}

.grid-item-image {
  margin-bottom: 1.33333em;
}

/* Hero section */
.block-hero {
  .block-header {
    margin-bottom: 0.83333em;
  }

  .block-title {
    font-size: 2.44444em;
  }
}

/* Portfolio section */
.view-all-button {
  box-sizing: border-box;
  color: _palette(accent);
  display: inline-block;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.2;
  padding: 0.9em 1em;
  left: 50%;
  position: absolute;
  top: 50%;
  -webkit-transform: translate(-50%,-50%);
  transform: translate(-50%,-50%);
  z-index: 2;

  .accent-green & {
    color: _palette(accent-green);
  }

  .accent-blue & {
    color: _palette(accent-blue);
  }

  .accent-violet & {
    color: _palette(accent-violet);
  }

  .accent-yellow & {
    color: _palette(accent-yellow);
  }

  &:before,
  &:after {
    border: 2px solid _palette(accent);
    box-sizing: border-box;
    content: "";
    height: 32%;
    left: 0;
    position: absolute;
    transition: .3s ease;
    -webkit-transition: .3s ease;
    width: 100%;

    .accent-green & {
      border-color: _palette(accent-green);
    }
  
    .accent-blue & {
      border-color: _palette(accent-blue);
    }
  
    .accent-violet & {
      border-color: _palette(accent-violet);
    }
  
    .accent-yellow & {
      border-color: _palette(accent-yellow);
    }
  }

  &:before {
    border-bottom: 0;
    top: 0;
  }

  &:after {
    border-top: 0;
    bottom: 0;
  }
}

.view-all-link {
  .project-thumbnail {
    &:after {
      opacity: 1;
      visibility: visible;
    }
  }

  &:hover,
  &:focus {
    .view-all-button {
      &:before,
      &:after {
        height: 50%;
      }
    }
  }
}

/* Testimonials section */
.testimonial {
  font-size: 1em;
  line-height: 1.66667;
  margin: 0;
  padding-left: 1.66667em;

  &:before {
    font-size: 3rem;
  }

  .palette-dark & {
    color: _palette(charcoal-light-60);
  }
}

.testimonial-footer {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  margin-top: 1.33333em;
}

.testimonial-avatar {
  border-radius: 50%;
  height: 60px;
  margin-right: 0.83333em;
  width: 60px;
}

.testimonial-author {
  font-size: 0.88889em;
  font-weight: bold;
  margin: 0;
}

@media only screen and (max-width: 600px) {
  .block {
    padding-top: 3.33333em;
  }

  .block-header {
    margin-bottom: 2em;
  }

  .block-hero {
    .block-title {
      font-size: 2.22222em;
    }
  }
}